Play will make musical sounds using the specified sound. There are two sounds that come with HyperCard: boing and harpsichord. Try clicking the Test Button to hear what "boing" sounds like.
You can specify a series of notes to play using the sound. The notes are specified with the letters "a" through "g", representing the scale. A number after the letter (1-7) will change octaves (4 is the middle octave).
Try typing your own notes below. If you're not very musical, you can copy the line at the bottom of the script and paste it into the handler. (The two dashed lines tell HyperCard that this is just a comment. When you copy the line, don't copy the dashes.)
Try replacing "boing" with "harpsichord" to see how it sounds.
Although these two sounds are the only ones that come with HyperCard, you can make your own sounds with a little box called a digitizer and a microphone. Then you can copy the sounds into HyperCard or a stack. This stack has a sound in it called "bell". Try replacing "boing" with "bell" to see how it sounds.
Digitized sounds can be made from any source. Unfortunately, a sound in digitized form can take up a lot of space on a diskette (a few seconds can take up to 100k). It's best to make short sounds and play them with a string of notes.
Click ? for more information on "play", writing music, and creating sounds.
-- part contents for background part 6
----- text -----
Play
-- part contents for background part 9
----- text -----
on mouseUp
play "boing" c d e f g a b c5
end mouseUp
-- play "boing" tempo 380 b3 c#4 d e f# g a#3 g4 f# e d c# d r f#
-- part contents for background part 13
----- text -----
on mouseUp
play "boing" c d e f g a b c5
end mouseUp
-- play "boing" tempo 380 b3 c#4 d e f# g a#3 g4 f# e d c# d r f#